package com.example.a2032.db.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.a2032.entity.JstyleClock;

import java.util.List;


@Dao
public interface ClockDataDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(JstyleClock jstyleClock);

    @Query("select * from jstyleclock")
    LiveData<List<JstyleClock>> loadAllClock();
    @Query("delete from jstyleclock where id = :userId")
    int deleteClock(long userId);
}
